/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import assert from "assert"
import { foo1, foo2, foo3, foo4 } from './export_declaration_01'
import { className1 } from './export_declaration_01'
import { var1, var2, var3, var4, var5, var6 } from './export_declaration_01'

assert(foo1() === 1);
const function_iteraotr= foo2();
assert(function_iteraotr.next().value === 1);
assert(function_iteraotr.next().value === 2);

async function assser_async() {
  assert(await foo3() === 3);
  assert((await foo4().next()).value === 4);
}
assser_async();

let ins = new className1();
assert(ins.prop === 'hello');

assert(var1 === 1);
assert(var2 === 2);
assert(var3 === 3);
assert(var4 === 4);
assert(var5 === 5);
assert(var6 === 6);
